package cn.bai.mvc;

import java.util.List;

/**
 * Created by Admin on 12/23 0023.
 */
public interface CustomerDao {
    /**
     * 封装了查询条件
     * @param cc
     * @return
     */
    List<Customer> getForListWithCriteriaCustomer(CriteriaCustomer cc);
    List<Customer> getAll();
    void save(Customer customer);
    Customer get(Integer id);
    void delete(Integer id);
    void update(Customer customer);

    /**
     * 返回和name 相等的记录数
     * @param name
     * @return
     */
    long getCountWithName(String name);
}
